<?xml version="1.0" encoding="utf-8"?>
<Content type="xform" name="EditContent">
  <model>
    <instance>
      <tblContent>
        <nContentKey/>
        <nContentPrimaryId/>
        <nVersion/>
        <cContentForiegnRef/>
        <cContentName/>
        <cContentSchemaName>Module</cContentSchemaName>
        <cContentXmlBrief>
          <Content moduleType="CustomSiteMapList" treeStart="" contentType="MenuItem" box="" title="" link="" linkType="internal" linkText="More" sortBy="Position" order="ascending" cols="1" stepCount="0" display="all" displayDescription="false" position="" />
        </cContentXmlBrief>
        <cContentXmlDetail/>
        <nAuditId/>
        <nAuditKey/>
        <dPublishDate/>
        <dExpireDate/>
        <dInsertDate/>
        <nInsertDirId/>
        <dUpdateDate/>
        <nUpdateDirId/>
        <nStatus>1</nStatus>
        <cDescription/>
        <bCascade/>
      </tblContent>
    </instance>
    <submission id="EditContent" action="" method="post" event="return form_check(this)"/>
    <bind id="cModuleTitle" nodeset="tblContent/cContentName" required="false()" type="string"/>
    <bind nodeset="tblContent/cContentXmlBrief/Content">
      <bind id="cPosition" nodeset="@position" required="true()" type="string"/>
      <bind id="cModuleType" nodeset="@moduleType" required="true()" type="string"/>
      <bind id="cModuleTreeStart" nodeset="@treeStart" required="true()" type="string"/>
      <bind id="cModuleBox" nodeset="@box" required="false()" type="string"/>
      <bind id="cModuleTitle" nodeset="@title" required="false()" type="string"/>
      <bind id="cModuleLink" nodeset="@link" required="false()" type="string"/>
      <bind id="cLinkType" nodeset="@linkType" required="false()" type="string"/>
      <bind id="cModuleLinkText" nodeset="@linkText" required="false()" type="string"/>
      <bind id="nColumns" nodeset="@cols" required="false()" type="string"/>
      <bind id="nStepCount" nodeset="@stepCount" required="false()" type="string"/>
      <bind id="cDisplay" nodeset="@display" required="false()" type="string"/>
      <bind id="cSortBy" nodeset="@sortBy" required="false()" type="string"/>
      <bind id="cPageOrder" nodeset="@order" required="false()" type="string"/>
      <bind id="cDisplayDescription" nodeset="@displayDescription" required="false()" type="string"/>
    </bind>
    <bind id="cContentBody" nodeset="tblContent/cContentXmlBrief/Content" required="false()" type="string"/>
    <bind id="dPublishDate" nodeset="tblContent/dPublishDate" required="false()" type="string"/>
    <bind id="dExpireDate" nodeset="tblContent/dExpireDate" required="false()" type="string"/>
    <bind id="nStatus" nodeset="tblContent/nStatus" required="true()" type="string"/>
    <bind id="cDescription" nodeset="tblContent/cDescription" required="false()" type="string"/>
    <bind id="bCascade" nodeset="tblContent/bCascade" required="false()" type="string"/>
  </model>
  <group ref="EditContent" class="2col">
    <label>Custom Site Map Module</label>
    <group>
      <group>
        <!-- These hidden fields and bindings are required for the component-->
        <input bind="nContentKey" class="hidden">
          <label>ContentId</label>
        </input>
        <input bind="cModuleType" class="hidden">
          <label>ModuleType</label>
        </input>
        <!-- end of hidden fields -->
        <label>Settings</label>
        <input bind="cPosition" class="readonly">
          <label>Position</label>
        </input>
        <input bind="dPublishDate" class="calendar short">
          <label>Publish Date</label>
        </input>
        <input bind="dExpireDate" class="calendar short">
          <label>Expire Date</label>
        </input>
        <select1 bind="nStatus" appearance="full" class="vshort">
          <label>Status</label>
          <item>
            <label>Live</label>
            <value>1</value>
          </item>
          <item>
            <label>Hidden</label>
            <value>0</value>
          </item>
        </select1>
        <select bind="bCascade" appearance="full">
          <label>Cascade to Child Pages</label>
          <item>
            <label></label>
            <value>true</value>
          </item>
        </select>
      </group>

    </group>

    <group>
      <group>
        <label>Content</label>
        <input bind="cModuleTitle" class="long">
          <label>Title or Name</label>
        </input>

        <select1 bind="cModuleTreeStart" class="siteTree">
          <label>Page from which the tree should start</label>
        </select1>

        <!--<select1 bind="cDisplay" appearance="full" class="required">
        <label>Show Items</label>
        <item>
          <label>All items on the current page</label>
          <value>all</value>
          <toggle case="cDisplay_1" event="DOMActivate"/>
        </item>
        <item>
          <label>Related items specified below</label>
          <value>related</value>
          <toggle case="cDisplay_2" event="DOMActivate"/>
        </item>
      </select1>-->

        <!--<switch class="disable">
          <case id="cDisplay_1"/>
          <case id="cDisplay_2">
            <relatedContent search="find add" type="NewsArticle" relationType="" direction="1way">
              <label>News Articles</label>
            </relatedContent>
          </case>
        </switch>-->

      </group>

      <group  class="inline">
        <label>Display Settings</label>
        <select1 bind="cModuleBox" class="boxStyle" appearance="minimal">
          <label>Box Style</label>
          <item>
            <label>None</label>
            <value>false</value>
          </item>
          <item>
            <label>Default Box</label>
            <value>Default Box</value>
          </item>
        </select1>
        <select1 bind="cDisplayDescription" appearance="full" class="vshort">
          <label>Display each pages' description</label>
          <item>
            <label>Yes</label>
            <value>true</value>
          </item>
          <item>
            <label>No</label>
            <value>false</value>
          </item>
        </select1>


        <!--<select1 bind="cSortBy" appearance="full" class="vshort">
        <label>Sort By</label>
        <item>
          <label>Publish Date</label>
           This can be @attribute or Node() name() to sort by 
          <value>publish</value>
          <toggle case="cSortBy_1" event="DOMActivate"/>
        </item>
        <item>
          <label>Alphabetical</label>
           This can be @attribute or Node() name() to sort by 
          <value>Headline</value>
          <toggle case="cSortBy_2" event="DOMActivate"/>
        </item>
        <item>
          <label>Page Position</label>
          <value>Position</value>
          <toggle case="cSortBy_3" event="DOMActivate"/>
        </item>
      </select1>
      <switch class="disable">
        <case id="cSortBy_1">
          <select1 bind="cPageOrder" appearance="minimal" class="vshort">
            <label>Order</label>
            <item>
              <label>Newest to Oldest</label>
              <value>descending</value>
            </item>
            <item>
              <label>Oldest to Newest</label>
              <value>ascending</value>
            </item>
          </select1>
        </case>
        <case id="cSortBy_2">
          <select1 bind="cPageOrder" appearance="minimal" class="vshort">
            <label>Order</label>
            <item>
              <label>A to Z</label>
              <value>ascending</value>
            </item>
            <item>
              <label>Z to A</label>
              <value>descending</value>
            </item>
          </select1>
        </case>
        <case id="cSortBy_3" />
      </switch>
		  <select1 bind="nStepCount" appearance="full" class="required vshort">
			  <label>Articles per page</label>
			  <item>
				  <label>all</label>
				  <value>0</value>
			  </item>
			  <item>
				  <label>3</label>
				  <value>3</value>
			  </item>
			  <item>
				  <label>5</label>
				  <value>5</value>
			  </item>
			  <item>
				  <label>10</label>
				  <value>10</value>
			  </item>
			  <item>
				  <label>25</label>
				  <value>25</value>
			  </item>
		  </select1>-->
      </group>

      <group>
        <label>Module Links</label>
        <select1 bind="cModuleLink" class="siteTree">
          <label>Page for the module title and module footer link</label>
        </select1>
        <input bind="cModuleLinkText" class="long">
          <label>Module footer link text</label>
        </input>
      </group>

    </group>

  </group>
  <group ref="submit" class="contentSubmit">
    <submit submission="" ref="ewSubmit" class="principle">
      <label>Save Custom Site Map</label>
    </submit>
  </group>
</Content>
